package com.example.taxiclient;

import com.example.taxiclient.MainActivity;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class MainActivity extends Activity {
	private Button Waiting;
	private String Id;
	private EditText TaxiId;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		Waiting = (Button) findViewById(R.id.Waiting);
		TaxiId = (EditText) findViewById(R.id.TaxiId);
		Waiting.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Id = TaxiId.getText().toString();
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, TaxiServiceActivity.class);
				Bundle bundle = new Bundle();
				bundle.putString("taxiid", Id);
				intent.putExtras(bundle);
				startActivity(intent);
				finish();
			}

		});

	}

	public static final int geoTransfer(double source) {
		return (int) (source * 1E6);
	}

}
